package destiny.music.view.model;

import java.util.Vector;

import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import destiny.music.entity.Music;
import destiny.music.view.MusicListItem;

public class MusicListAdapter extends BaseAdapter{
	private Vector<Music> musics;
	//TextView textView;
	Context context;
	
	public MusicListAdapter(Vector<Music> musics,Context context) {
		super();
		this.musics = musics;
		//this.textView = new TextView(context);
		this.context = context;
	}

	@Override
	public int getCount() {
		return musics.size();
	}

	@Override
	public Object getItem(int position) {
		return musics.get(position);
	}

	@Override
	public long getItemId(int position) {
		return 0;
	}

	@Override
	public View getView(int position, View convertView, ViewGroup parent) {
		return new MusicListItem(context, musics.get(position));
	}

}
